<?php

use yii\bootstrap\Modal;

?>

<style type="text/css">
	body {
		margin: 0;
		padding: 0;
		width: 100%;
	}
#prints-content{
	height: 100vh;
	overflow: scroll;
}
	.clearfloat {
		overflow: hidden;
	}

	.left {
		float: left;
	}

	.right {
		float: right;
	}

	.font10 {
		font-size: 14px;
	}

	.fontW {
		font-weight: bold;
	}

	.font8 {
		font-size: 12px;
	}

	.margin2 {
		margin: 2px 0;
	}

	.margin5 {
		margin: 5px 0 !important;
	}

	.printer {
		width: 174px;
		margin: 0 auto;
	}

	.title {
		text-align: center;
		width: 90%;
		margin: auto;
		padding: 5px 0;
	}

	.divide {
		text-align: center;
		margin: auto;
	}

	.detail {
		margin: 2px 0;
	}

	.detail>.left {
		margin-left: 10px;
	}

	.quan>.left {
		margin-left: 10px;
	}

	.bottom {
		width: 100%;
		height: 200px;
		background: pink;
		clear: both;
		/* 位于上方写了float的div，下面这个div必须加这一句 */
	}
</style>
<?php Modal::begin([
	'header' => '打印预览',
	'toggleButton' => [
		'label' => '批量打印',
		'class' => ' btn  btn-primary  prints-modal',
		'id'=>'printId'

	],
	'footer' => '
     <a href="javascript:prn1_preview()" class="btn  btn-primary">打印预览</a>
              <a href="javascript:prn1_print()" class="btn  btn-primary">直接打印</a>
                <a href="javascript:prn1_printA()" class="btn  btn-primary">选择打印机</a>',
]); ?>

<div id="prints-content">
	<div class="printer"  v-if="order.length==0">
		请至少选择一个订单打印
	</div>
	<div class="printer" v-for="item in order">
		<div class="title font10 fontW">
			<div>{{title}}</div>
			<div style="margin-top:2px;">交易汇总</div>
		</div>
		<div class="divide">===================</div>
		<div class="haha clearfloat font8">
			<span class="left">下单时间:</span>
			<span class="right">{{item.create_time}}</span>
		</div>
		<div class="haha clearfloat font8">
			<span class="left">是否付款:</span>
			<span class="right">{{item.pay_status==0?'未付款':'已付款'}}</span>
		</div>

		<div class="title font10 fontW" v-if="item.goods.length>0">
			<div style="margin-top:2px;">商品列表</div>
		</div>
		<div class="haha clearfloat font8" v-for="goods in item.goods">
			<span class="left">{{goods.goods_name}}</span>
			<span class="right">{{goods.goods_price}}*{{goods.total_num}}</span>
		</div>

		<div class="content">
			<div class="divide">-----------------------------</div>
			<div class="head font8 clearfloat fontW">
				<span class="left">总收款:</span>
				<span class="right">{{item.pay_price}}</span>
			</div>
			<div class="detail font8 clearfloat">
				<span class="left">运费:</span>
				<span class="right">{{item.express_price}}</span>
			</div>

			<div class="divide margin5">>>>>>>>>>>>>>>>>>></div>
			<div class="font8 clearfloat margin2">
				<span class="left">打印人:</span>
				<span class="right">王春生</span>
			</div>
			<div class="font8 clearfloat margin2">
				<span class="left">打印时间:</span>
				<span class="right">{{date}}</span>
			</div>
			<div class="font8 clearfloat margin2">
				<img :src="store.wxappHeadimg" width="90%" height="auto" />
			</div>
		</div>
	</div>
	
</div>

<?php Modal::end(); ?>